package com.vol.controller;

import com.vol.CeshiService;
import com.vol.AuthParams;
import com.vol.entity.SysUser;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import com.vol.entity.Result;


@RestController
@RequestMapping("api/ceshi")
@CrossOrigin
public class CeshiController {

    @Autowired
    private CeshiService ceshiService;

    @AuthParams("用户修改")
    @RequestMapping("index")
    public Result index(){
        List<SysUser> list = ceshiService.getList();
        return Result.ok(list,1,"操作成功！");
    }


    @RequestMapping("changepass")
    public boolean ChangePass(){
        boolean result = ceshiService.changepass();
        return result;
    }


}
